home *** CD-ROM | disk | FTP | other *** search
- /* %filename% -- application methods */
- /* Created %date% %time% by AppMaker */
-
- /* This module overrides the AppMaker-generated code in z%Appname%App.% %*/
- /* It provides a place for you to add your own code and still be able to */
- /* generate code for new changes to the user interface. This module will */
- /* not be regenerated by AppMaker unless you delete it. Its superclass, */
- /* z%Appname%App, may be regenerated to handle user interface changes% %*/
- /* without losing your hand-coded changes to this module. */
-
- #include <Commands.h>
- #include <CBartender.h>
- #include <CWindow.h>
- #include <Global.h>
- #include "ResourceDefs.h"
- %for each menu gen includeAppDialogs%
- #include "%Appname%Data.h"
- #include "%Appname%App.h"
-
- extern OSType gSignature;
- extern CBartender *gBartender;
-
- /*----------*/
- void C%Appname%App::I%Appname%App (void)
- {
- inherited::I%Appname%App ();
-
- // your application-specific initialization:
-
- } /* I%Appname%App */
-
- /*----------*/
- void C%Appname%App::SetUpFileParameters (void)
- {
- inherited::SetUpFileParameters ();
- sfNumTypes = 1;
- sfFileTypes [0] = kFileType;
- gSignature = kSignature;
-
- } /* SetUpFileParameters */
-
- /*----------*/
- void C%Appname%App::UpdateMenus (void)
- {
- inherited::UpdateMenus ();
- %for each menu gen updateAppMenus%
-
- } /* UpdateMenus */
-
- /*----------*/
- void C%Appname%App::DoCommand (long theCommand)
- {
- short theMenu;
- short theItem;
- Str255 theItemText;
-
- if (theCommand < 0) { /* menu generated dynamically */
- theMenu = HiShort (-theCommand);
- if (theMenu == MENUapple) {
- inherited::DoCommand (theCommand); /* handle Apple menu in superclass */
- } else {
- theItem = LoShort (-theCommand);
- GetItem (GetMHandle (theMenu), theItem, theItemText);
- /* do the right thing with the text of the item */
- }
- } else {
- switch (theCommand) {
- %for each menu gen handleAppItems%
-
- default:
- inherited::DoCommand (theCommand);
- break;
- } /* switch */
- }
-
- } /* DoCommand */
-
- /* %filename% */
-